package ysm.controller.admin;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import ysm.entity.Profession;
import ysm.service.ProfessionService;

@RestController
@RequestMapping("/public")
public class ProfessionController {
	
	@Autowired
	private ProfessionService professionService;
	
	@RequestMapping("/loadAllProfession")
	public List loadAllProfession() {
		return professionService.loadAllProfession();
	}
	
	@RequestMapping("/selectProfessionByPrimaryKey")
	Profession selectByPrimaryKey(Integer id) {
		return professionService.selectByPrimaryKey(id);
	}
	
	@RequestMapping("/insertProfession")
	public void insert(Profession record) {
		professionService.insert(record);
	}
	
	@RequestMapping("/updateProfessionByPrimaryKey")
	public void updateByPrimaryKey(Profession record) {
		professionService.updateByPrimaryKey(record);
	}

}
